import { request } from '/@/utils/service';
import { UserPageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud';

export const apiPrefix = '/api/k_data/';

interface GetListParams {
  pair_name: string
  page: number
  limit: number
  cycle?: string   // 改为字符串类型
  close?: string    // 改为字符串类型
}

export function GetList(obj: GetListParams) {  // 使用类型化参数
  return request({
    url: apiPrefix + 'data/v2/',
    method: 'get',
    params: obj
  });
}

export function DeleteById(obj: DelReq) {
  return request({
    url: apiPrefix + 'delete/',
    method: 'delete',
    data: obj
  });
}